CS475/505 Assignment 2

Search Techniques

 

Goal: to compare the performance of uninformed and informed search techniques.

Implement the following algorithms to search for solutions to the 8-puzzle:

·         Breadth-first

·         Iterative deepening search

·         Best-first using the four heuristics

o   h1=  number of misplaced tiles

o   h2 = Manhattan distance

o   h3 = 0

o   h4 = a random number between 1 and 10

·         A* using the same four heuristics.

You will need to choose a state representation and implement actions as state transformers. Generate 20 random start states and run each algorithm to completion on the same set of start states, whether it succeeds or fails. Have the program calculate the following for each algorithm:

1.      The percentage of problems that were solvable

2.      The percentage of the problems that were solved optimally.

3.      The average number of nodes expanded (only include the problems with solutions)

4.      The maximum number of nodes in the fringe (only include the problems with solutions)

5.      The average CPU elapsed time (only for problems with solutions)

Random start states (and the optimal solution) may be generated by starting with the goal state and applying n random moves.

When you have completed your runs, write a brief report answering the following questions:

·         How did the uninformed techniques compare for time and space with the informed techniques?

·         How did the choice of heuristic function affect the results of the best-first and A* algorithms?

·         How did your experimental results reflect your theoretical understanding of the algorithms?

Language

You may use any language to implement this project. However, we recommend C, C++, or Java. We should be able to easily compile (or interpret) your program for testing on any Linux machine in the CS department. It is your responsibility to make sure your program compiles and runs. If it does not, you will not get any credit. You may not search online for code for solving the 8-puzzle. You may look at the book code for search algorithms online. However, if you do use them, you must cite the code. If you violate this trust you could receive a zero.

What to turn in

1.      Copies of all your source code for all four algorithms and a single driver that runs them all in turn. Preferably a single zip or jar file.

2.      The performance results (the output of the algorithm runs.).

3.      The report comparing the techniques.

Due date

February 18th, before midnight.